package com.fuze.domain.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author sepc_
 * @date 4/1/2021 14:55
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "user_tab")
public class User implements Serializable {
    private static final long serialVersionUID = -3330062043126140936L;
    /**
     * 自增主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 系统内的用户名
     */
    @TableField(value = "username")
    private String username;

    /**
     * 系统用户密码
     */
    @TableField(value = "`password`")
    private String password;

    /**
     * 手机号
     */
    @TableField(value = "telephone")
    private String telephone;

    /**
     * 购电公司名+户号
     */
    @TableField(value = "market_members_name")
    private String marketMembersName;

    /**
     * 简称
     */
    @TableField(value = "abbreviation")
    private String abbreviation;

    /**
     * 市场成员类型
     */
    @TableField(value = "marker_members_type")
    private String markerMembersType;

    /**
     * 业务场景
     */
    @TableField(value = "business_scenarios")
    private String businessScenarios;

    /**
     * 用户交易类型
     */
    @TableField(value = "user_transaction_type")
    private String userTransactionType;

    /**
     * 用户交易线路
     */
    @TableField(value = "transaction_line")
    private String transactionLine;

    /**
     * 用电单元
     */
    @TableField(value = "power_consumption_unit")
    private String powerConsumptionUnit;

    /**
     * 地理区域
     */
    @TableField(value = "`location`")
    private String location;

    /**
     * 行业分类
     */
    @TableField(value = "industry_classification")
    private String industryClassification;

    /**
     * 园区用户
     */
    @TableField(value = "park_users")
    private String parkUsers;

    /**
     * 最高供电电压
     */
    @TableField(value = "maximum_supply_voltage")
    private String maximumSupplyVoltage;

    /**
     * 合同容量
     */
    @TableField(value = "contract_capacity")
    private String contractCapacity;

    /**
     * 是否核定了直接交易输配电价
     */
    @TableField(value = "direct_transaction_electric_price")
    private String directTransactionElectricPrice;

    /**
     * 入市时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField(value = "market_entry_time")
    private Date marketEntryTime;

    /**
     * 退市时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField(value = "delisting_time")
    private Date delistingTime;

    /**
     * （合同）更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 附件
     */
    @TableField(value = "enclosure")
    private String enclosure;

    /**
     * 曾用名
     */
    @TableField(value = "name_used_before")
    private String nameUsedBefore;

    /**
     * 注册编码
     */
    @TableField(value = "registration_code")
    private String registrationCode;

    /**
     * 状态
     */
    @TableField(value = "`type`")
    private String type;

    /**
     * 企业法人名称
     */
    @TableField(value = "enterprise_legal_person_name")
    private String enterpriseLegalPersonName;

    /**
     * 法人代表姓名
     */
    @TableField(value = "legal_representative_name")
    private String legalRepresentativeName;

    /**
     * 企业法人营业执照注册号
     */
    @TableField(value = "business_license_number")
    private String businessLicenseNumber;

    /**
     * 企业注册地址
     */
    @TableField(value = "business_registration_address")
    private String businessRegistrationAddress;

    /**
     * 售电层级
     */
    @TableField(value = "sales_level")
    private String salesLevel;

    /**
     * 售电结算单位
     */
    @TableField(value = "electricity_sales_settlement_unit")
    private String electricitySalesSettlementUnit;

    /**
     * 组织结构代码
     */
    @TableField(value = "organization_code")
    private String organizationCode;

    /**
     * 税务登记证号
     */
    @TableField(value = "tax_registration_number")
    private String taxRegistrationNumber;

    /**
     * 开户银行
     */
    @TableField(value = "bank_of_deposit")
    private String bankOfDeposit;

    /**
     * 开户名称
     */
    @TableField(value = "account_name")
    private String accountName;

    /**
     * 开户账号
     */
    @TableField(value = "account_number")
    private String accountNumber;

    /**
     * 营销用户编号
     */
    @TableField(value = "marketing_user_number")
    private String marketingUserNumber;

    /**
     * 用电类别
     */
    @TableField(value = "electricity_consumption_type")
    private String electricityConsumptionType;

    /**
     * 用电地址
     */
    @TableField(value = "electricity_consumption_address")
    private String electricityConsumptionAddress;

    /**
     * 联系人姓名
     */
    @TableField(value = "contact_name")
    private String contactName;

    /**
     * 联系人职务
     */
    @TableField(value = "contact_title")
    private String contactTitle;

    /**
     * 传真
     */
    @TableField(value = "fax")
    private String fax;

    /**
     * 电子邮件
     */
    @TableField(value = "email")
    private String email;

    /**
     * 网址
     */
    @TableField(value = "website")
    private String website;

    /**
     * 通信地址
     */
    @TableField(value = "mailing_address")
    private String mailingAddress;

    /**
     * 邮政编码
     */
    @TableField(value = "postal_code")
    private String postalCode;

    /**
     * 用户是否绑定
     * 1-绑定，2-未绑定
     */
    @TableField(value = "bind_type")
    private String bindType;

    /**
     * 逻辑删除
     */
    @TableField(value = "deleted")
    private Integer deleted;

    /**
     * 数据创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdTime;

    /**
     * 数据更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedTime;

    public static final String COL_ID = "id";

    public static final String COL_USERNAME = "username";

    public static final String COL_PASSWORD = "password";

    public static final String COL_TELEPHONE = "telephone";

    public static final String COL_MARKET_MEMBERS_NAME = "market_members_name";

    public static final String COL_ABBREVIATION = "abbreviation";

    public static final String COL_MARKER_MEMBERS_TYPE = "marker_members_type";

    public static final String COL_BUSINESS_SCENARIOS = "business_scenarios";

    public static final String COL_USER_TRANSACTION_TYPE = "user_transaction_type";

    public static final String COL_TRANSACTION_LINE = "transaction_line";

    public static final String COL_POWER_CONSUMPTION_UNIT = "power_consumption_unit";

    public static final String COL_LOCATION = "location";

    public static final String COL_INDUSTRY_CLASSIFICATION = "industry_classification";

    public static final String COL_PARK_USERS = "park_users";

    public static final String COL_MAXIMUM_SUPPLY_VOLTAGE = "maximum_supply_voltage";

    public static final String COL_CONTRACT_CAPACITY = "contract_capacity";

    public static final String COL_DIRECT_TRANSACTION_ELECTRIC_PRICE = "direct_transaction_electric_price";

    public static final String COL_MARKET_ENTRY_TIME = "market_entry_time";

    public static final String COL_DELISTING_TIME = "delisting_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_ENCLOSURE = "enclosure";

    public static final String COL_NAME_USED_BEFORE = "name_used_before";

    public static final String COL_REGISTRATION_CODE = "registration_code";

    public static final String COL_TYPE = "type";

    public static final String COL_ENTERPRISE_LEGAL_PERSON_NAME = "enterprise_legal_person_name";

    public static final String COL_LEGAL_REPRESENTATIVE_NAME = "legal_representative_name";

    public static final String COL_BUSINESS_LICENSE_NUMBER = "business_license_number";

    public static final String COL_BUSINESS_REGISTRATION_ADDRESS = "business_registration_address";

    public static final String COL_SALES_LEVEL = "sales_level";

    public static final String COL_ELECTRICITY_SALES_SETTLEMENT_UNIT = "electricity_sales_settlement_unit";

    public static final String COL_ORGANIZATION_CODE = "organization_code";

    public static final String COL_TAX_REGISTRATION_NUMBER = "tax_registration_number";

    public static final String COL_BANK_OF_DEPOSIT = "bank_of_deposit";

    public static final String COL_ACCOUNT_NAME = "account_name";

    public static final String COL_ACCOUNT_NUMBER = "account_number";

    public static final String COL_MARKETING_USER_NUMBER = "marketing_user_number";

    public static final String COL_ELECTRICITY_CONSUMPTION_TYPE = "electricity_consumption_type";

    public static final String COL_ELECTRICITY_CONSUMPTION_ADDRESS = "electricity_consumption_address";

    public static final String COL_CONTACT_NAME = "contact_name";

    public static final String COL_CONTACT_TITLE = "contact_title";

    public static final String COL_FAX = "fax";

    public static final String COL_EMAIL = "email";

    public static final String COL_WEBSITE = "website";

    public static final String COL_MAILING_ADDRESS = "mailing_address";

    public static final String COL_POSTAL_CODE = "postal_code";

    public static final String COL_BIND_TYPE = "bind_type";
}